-
Notifications
You must be signed in to change notification settings - Fork 334
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Notifications assets full support #2295
Conversation
// subKey: \Software\Classes\AppUserModelId\{AppGUID} | ||
std::wstring subKey{ c_appIdentifierPath + appId }; | ||
|
||
THROW_IF_WIN32_ERROR(RegCreateKeyEx( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does WIL have registry functions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't believe it does. But that would be very nice to have :)
I can't attach comments to unchanged lines so am putting it here instead. WindowsAppSDK/dev/AppNotifications/AppNotificationUtility.cpp Lines 75 to 81 in ce1563a
This chunk of code generates a GUID with a known length then measures the length again, which isn't efficient. Instead you can perhaps do one of a few things (consult your nearest FTE for final guidance):
WindowsAppSDK/dev/AppNotifications/AppNotificationUtility.cpp Lines 353 to 355 in ce1563a
|
@@ -175,7 +148,8 @@ int main() | |||
const PACKAGE_VERSION minVersion{}; | |||
RETURN_IF_FAILED(MddBootstrapInitialize(c_Version_MajorMinor, nullptr, minVersion)); | |||
|
|||
SetDisplayNameAndIcon(); | |||
// Not mandatory, but it's highly recommended to specify AppUserModelId | |||
THROW_IF_FAILED(SetCurrentProcessExplicitAppUserModelID(L"TestAppId")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vaheeshta This is needed if we want apps to maintain their toast states even after a process name update later in the future. For example, if unpackaged app foo.exe has a name change to bar.exe in the future, this ensures that the apps toasts remain in the actioncentre. We should document.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It also is needed if apps change their path from c:\foo\name.exe to d:\bar\name.exe.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it. I'll document this once I have the unpackaged sample code.
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
I have addressed all comments. Thank you for reviewing this PR! 😊
|
||
// Store the converted bitmap as ppToRenderBitmapSource | ||
winrt::com_ptr<IWICBitmapSource> wicBitmapSourceConverted; | ||
THROW_IF_FAILED(wicFormatConverter->QueryInterface(_uuidof(IWICBitmapSource), wicBitmapSourceConverted.put_void())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(No change required)
I think this can be return wicFormatConverter.as<IWICBitmapSource>()
?
|
||
THROW_IF_FAILED(wicFormatConverter->Initialize(wicBitmapSource.get(), guidPixelFormatSource, bitmapDitherType, nullptr, 0.f, WICBitmapPaletteTypeCustom)); | ||
|
||
// Store the converted bitmap as ppToRenderBitmapSource |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dead comment, please remove
No description provided.